Optimal. Leaf size=51 \[ -\frac {c \log (x) (b c-2 a d)}{a^2}+\frac {(b c-a d)^2 \log (a+b x)}{a^2 b}-\frac {c^2}{a x} \]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {88} \begin {gather*} -\frac {c \log (x) (b c-2 a d)}{a^2}+\frac {(b c-a d)^2 \log (a+b x)}{a^2 b}-\frac {c^2}{a x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 88
Rubi steps
\begin {align*} \int \frac {(c+d x)^2}{x^2 (a+b x)} \, dx &=\int \left (\frac {c^2}{a x^2}+\frac {c (-b c+2 a d)}{a^2 x}+\frac {(-b c+a d)^2}{a^2 (a+b x)}\right ) \, dx\\ &=-\frac {c^2}{a x}-\frac {c (b c-2 a d) \log (x)}{a^2}+\frac {(b c-a d)^2 \log (a+b x)}{a^2 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 51, normalized size = 1.00 \begin {gather*} \frac {-a b c^2+b c x \log (x) (2 a d-b c)+x (b c-a d)^2 \log (a+b x)}{a^2 b x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(c+d x)^2}{x^2 (a+b x)} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.28, size = 66, normalized size = 1.29 \begin {gather*} -\frac {a b c^{2} - {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} x \log \left (b x + a\right ) + {\left (b^{2} c^{2} - 2 \, a b c d\right )} x \log \relax (x)}{a^{2} b x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.90, size = 66, normalized size = 1.29 \begin {gather*} -\frac {c^{2}}{a x} - \frac {{\left (b c^{2} - 2 \, a c d\right )} \log \left ({\left | x \right |}\right )}{a^{2}} + \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left ({\left | b x + a \right |}\right )}{a^{2} b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 73, normalized size = 1.43 \begin {gather*} \frac {2 c d \ln \relax (x )}{a}-\frac {2 c d \ln \left (b x +a \right )}{a}-\frac {b \,c^{2} \ln \relax (x )}{a^{2}}+\frac {b \,c^{2} \ln \left (b x +a \right )}{a^{2}}+\frac {d^{2} \ln \left (b x +a \right )}{b}-\frac {c^{2}}{a x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.12, size = 64, normalized size = 1.25 \begin {gather*} -\frac {c^{2}}{a x} - \frac {{\left (b c^{2} - 2 \, a c d\right )} \log \relax (x)}{a^{2}} + \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (b x + a\right )}{a^{2} b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.41, size = 58, normalized size = 1.14 \begin {gather*} \ln \left (a+b\,x\right )\,\left (\frac {d^2}{b}+\frac {b\,c^2}{a^2}-\frac {2\,c\,d}{a}\right )-\frac {c^2}{a\,x}+\frac {c\,\ln \relax (x)\,\left (2\,a\,d-b\,c\right )}{a^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.96, size = 141, normalized size = 2.76 \begin {gather*} - \frac {c^{2}}{a x} + \frac {c \left (2 a d - b c\right ) \log {\left (x + \frac {- 2 a^{2} c d + a b c^{2} + a c \left (2 a d - b c\right )}{a^{2} d^{2} - 4 a b c d + 2 b^{2} c^{2}} \right )}}{a^{2}} + \frac {\left (a d - b c\right )^{2} \log {\left (x + \frac {- 2 a^{2} c d + a b c^{2} + \frac {a \left (a d - b c\right )^{2}}{b}}{a^{2} d^{2} - 4 a b c d + 2 b^{2} c^{2}} \right )}}{a^{2} b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________